{% extends "categories/base_categories.html" %}


{% block title %}{{ category.name }}{% endblock %}
{% block body_class %}{{ block.super }} category_detail{% endblock %}
{% block body_id %}category_{{ category.id }}{% endblock %}


{% block content_title %}
	<p class="back"><a href="../">Back</a></p>
	<h2>{{ category.name }}</h2>
	{% if category.get_parents %}<h3>{% for parent in category.get_parents %}<a href="/categories/{{ parent.hierarchy.slug }}{{ parent.slug_path }}">{{ parent.name }}</a>{% if not forloop.last %} &rsaquo; {% endif %}{% endfor %}</h3>{% endif %}
{% endblock %}


{% block breadcrumbs %}
	<p>
		<a href="../">Categories</a>
		{% if category.get_parents %}
			{% for parent in category.get_parents %}<a href="{{ parent.get_absolute_url }}">{{ parent.name }}</a>{% endfor %}
		{% endif %}
		<span>{{ category.name }}</span>
	</p>
{% endblock %}


{% block content %}
  
  {% if category.children.count %}
    <h3 class="divider">Child categories</h3>
    <table class="category_list">
      <tr>
        <th>Category</th>
        <th>Path</th>
      </tr>
    {% for child in category.children.all %}
      <tr>
        <td><a href="./{{ child.slug }}/">{{ child.name }}</a></td>
        <td class="path">{{ child.path }}</td>
      </tr>
    {% endfor %}
    </table>
  {% endif %}

{% endblock %}
